package com.zzyl.mapper;


import com.zzyl.dto.ResourceDto;
import com.zzyl.entity.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author hesicheng
* @description 针对表【sys_resource(权限表)】的数据库操作Mapper
* @createDate 2024-05-17 11:32:51
* @Entity com.zzyl.entity1.Resource
*/
@Mapper
public interface ResourceMapper {



    List<Resource> resourceList(ResourceDto resourceDto);

    @Select("select * from sys_resource where resource_no = #{resourceNo}")
    Resource selectByResourceNo(String resourceNo);

    void insert(Resource resource);

    void updateDataState(@Param("resourceNo") String resourceNo,@Param("dataState") String dataState);

    void updateByParentResourceNo(@Param("resourceNo") String processString,@Param("dataState") String dataState);

    void deleteResource(String menuId);

    int hasChildByResoureId(String menuId);

    int updateByPrimaryKey(Resource resource);

    void clearnOrder(@Param("id") Long id,@Param("resourceNo") String resourceNo);
}




